﻿using Microsoft.AspNetCore.Mvc;
using ThreeObject.ERP.Model.Xiao;
using ThreeObject.ERP.Xiao;

namespace ThreeObject.ERP.Web.Controllers.xiao
{
    public class CustomerController : Controller
    {
        private readonly ICustomerServices customerServices;

        public CustomerController(ICustomerServices customerServices)
        {
            this.customerServices = customerServices;
        }

        public IActionResult Customer()
        {
            return View();
        }

        /// <summary>
        /// 添加客户管理
        /// </summary>
        /// <param name="customer">客户管理表</param>
        /// <returns>返回值</returns>
        [HttpPost]
        public int AddCustomer(Customer customer)
        {
            var result = customerServices.AddCustomer(customer);
            return result;
        }
    }
}
